Optimal. Leaf size=223 \[ -\frac{\left (3 a^2-b^2\right ) \cos ^5(c+d x)}{5 a^3 d}+\frac{b \left (3 a^2-b^2\right ) \cos ^4(c+d x)}{4 a^4 d}+\frac{\left (-3 a^2 b^2+3 a^4+b^4\right ) \cos ^3(c+d x)}{3 a^5 d}-\frac{b \left (-3 a^2 b^2+3 a^4+b^4\right ) \cos ^2(c+d x)}{2 a^6 d}-\frac{\left (a^2-b^2\right )^3 \cos (c+d x)}{a^7 d}+\frac{b \left (a^2-b^2\right )^3 \log (a \cos (c+d x)+b)}{a^8 d}-\frac{b \cos ^6(c+d x)}{6 a^2 d}+\frac{\cos ^7(c+d x)}{7 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.250938, antiderivative size = 223, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3872, 2837, 12, 772} \[ -\frac{\left (3 a^2-b^2\right ) \cos ^5(c+d x)}{5 a^3 d}+\frac{b \left (3 a^2-b^2\right ) \cos ^4(c+d x)}{4 a^4 d}+\frac{\left (-3 a^2 b^2+3 a^4+b^4\right ) \cos ^3(c+d x)}{3 a^5 d}-\frac{b \left (-3 a^2 b^2+3 a^4+b^4\right ) \cos ^2(c+d x)}{2 a^6 d}-\frac{\left (a^2-b^2\right )^3 \cos (c+d x)}{a^7 d}+\frac{b \left (a^2-b^2\right )^3 \log (a \cos (c+d x)+b)}{a^8 d}-\frac{b \cos ^6(c+d x)}{6 a^2 d}+\frac{\cos ^7(c+d x)}{7 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2837
Rule 12
Rule 772
Rubi steps
\begin{align*} \int \frac{\sin ^7(c+d x)}{a+b \sec (c+d x)} \, dx &=-\int \frac{\cos (c+d x) \sin ^7(c+d x)}{-b-a \cos (c+d x)} \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{x \left (a^2-x^2\right )^3}{a (-b+x)} \, dx,x,-a \cos (c+d x)\right )}{a^7 d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{x \left (a^2-x^2\right )^3}{-b+x} \, dx,x,-a \cos (c+d x)\right )}{a^8 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\left (a^2-b^2\right )^3+\frac{b \left (-a^2+b^2\right )^3}{b-x}-b \left (3 a^4-3 a^2 b^2+b^4\right ) x-\left (3 a^4-3 a^2 b^2+b^4\right ) x^2-b \left (-3 a^2+b^2\right ) x^3+\left (3 a^2-b^2\right ) x^4-b x^5-x^6\right ) \, dx,x,-a \cos (c+d x)\right )}{a^8 d}\\ &=-\frac{\left (a^2-b^2\right )^3 \cos (c+d x)}{a^7 d}-\frac{b \left (3 a^4-3 a^2 b^2+b^4\right ) \cos ^2(c+d x)}{2 a^6 d}+\frac{\left (3 a^4-3 a^2 b^2+b^4\right ) \cos ^3(c+d x)}{3 a^5 d}+\frac{b \left (3 a^2-b^2\right ) \cos ^4(c+d x)}{4 a^4 d}-\frac{\left (3 a^2-b^2\right ) \cos ^5(c+d x)}{5 a^3 d}-\frac{b \cos ^6(c+d x)}{6 a^2 d}+\frac{\cos ^7(c+d x)}{7 a d}+\frac{b \left (a^2-b^2\right )^3 \log (b+a \cos (c+d x))}{a^8 d}\\ \end{align*}
Mathematica [A] time = 1.34391, size = 282, normalized size = 1.26 \[ \frac{-1260 a^5 b^2 \cos (3 (c+d x))+84 a^5 b^2 \cos (5 (c+d x))-210 a^4 b^3 \cos (4 (c+d x))+560 a^3 b^4 \cos (3 (c+d x))-105 a \left (-152 a^4 b^2+176 a^2 b^4+35 a^6-64 b^6\right ) \cos (c+d x)-105 \left (-40 a^4 b^3+16 a^2 b^5+29 a^6 b\right ) \cos (2 (c+d x))-20160 a^4 b^3 \log (a \cos (c+d x)+b)+20160 a^2 b^5 \log (a \cos (c+d x)+b)+420 a^6 b \cos (4 (c+d x))-35 a^6 b \cos (6 (c+d x))+6720 a^6 b \log (a \cos (c+d x)+b)+735 a^7 \cos (3 (c+d x))-147 a^7 \cos (5 (c+d x))+15 a^7 \cos (7 (c+d x))-6720 b^7 \log (a \cos (c+d x)+b)}{6720 a^8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.049, size = 363, normalized size = 1.6 \begin{align*}{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{7}}{7\,ad}}-{\frac{b \left ( \cos \left ( dx+c \right ) \right ) ^{6}}{6\,{a}^{2}d}}-{\frac{3\, \left ( \cos \left ( dx+c \right ) \right ) ^{5}}{5\,ad}}+{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{5}{b}^{2}}{5\,d{a}^{3}}}+{\frac{3\,b \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{4\,{a}^{2}d}}-{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{4}{b}^{3}}{4\,d{a}^{4}}}+{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{ad}}-{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{3}{b}^{2}}{d{a}^{3}}}+{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{3}{b}^{4}}{3\,d{a}^{5}}}-{\frac{3\,b \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{2\,{a}^{2}d}}+{\frac{3\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}{b}^{3}}{2\,d{a}^{4}}}-{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{2}{b}^{5}}{2\,d{a}^{6}}}-{\frac{\cos \left ( dx+c \right ) }{ad}}+3\,{\frac{{b}^{2}\cos \left ( dx+c \right ) }{d{a}^{3}}}-3\,{\frac{{b}^{4}\cos \left ( dx+c \right ) }{d{a}^{5}}}+{\frac{{b}^{6}\cos \left ( dx+c \right ) }{d{a}^{7}}}+{\frac{b\ln \left ( b+a\cos \left ( dx+c \right ) \right ) }{{a}^{2}d}}-3\,{\frac{{b}^{3}\ln \left ( b+a\cos \left ( dx+c \right ) \right ) }{d{a}^{4}}}+3\,{\frac{{b}^{5}\ln \left ( b+a\cos \left ( dx+c \right ) \right ) }{d{a}^{6}}}-{\frac{{b}^{7}\ln \left ( b+a\cos \left ( dx+c \right ) \right ) }{d{a}^{8}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.05525, size = 302, normalized size = 1.35 \begin{align*} \frac{\frac{60 \, a^{6} \cos \left (d x + c\right )^{7} - 70 \, a^{5} b \cos \left (d x + c\right )^{6} - 84 \,{\left (3 \, a^{6} - a^{4} b^{2}\right )} \cos \left (d x + c\right )^{5} + 105 \,{\left (3 \, a^{5} b - a^{3} b^{3}\right )} \cos \left (d x + c\right )^{4} + 140 \,{\left (3 \, a^{6} - 3 \, a^{4} b^{2} + a^{2} b^{4}\right )} \cos \left (d x + c\right )^{3} - 210 \,{\left (3 \, a^{5} b - 3 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{2} - 420 \,{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \cos \left (d x + c\right )}{a^{7}} + \frac{420 \,{\left (a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{8}}}{420 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.9669, size = 504, normalized size = 2.26 \begin{align*} \frac{60 \, a^{7} \cos \left (d x + c\right )^{7} - 70 \, a^{6} b \cos \left (d x + c\right )^{6} - 84 \,{\left (3 \, a^{7} - a^{5} b^{2}\right )} \cos \left (d x + c\right )^{5} + 105 \,{\left (3 \, a^{6} b - a^{4} b^{3}\right )} \cos \left (d x + c\right )^{4} + 140 \,{\left (3 \, a^{7} - 3 \, a^{5} b^{2} + a^{3} b^{4}\right )} \cos \left (d x + c\right )^{3} - 210 \,{\left (3 \, a^{6} b - 3 \, a^{4} b^{3} + a^{2} b^{5}\right )} \cos \left (d x + c\right )^{2} - 420 \,{\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} \cos \left (d x + c\right ) + 420 \,{\left (a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{420 \, a^{8} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.28884, size = 2105, normalized size = 9.44 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]